package jcode.mybatismapper.model;

import jcode.mybatismapper.base.Table;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

@Table(tableName = "b_user", primaryKey = "id")
public class User {

    private Integer id;

    @UpdateName
    private String userName;
    private Integer age;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", age=" + age +
                '}';
    }

    @Retention(RetentionPolicy.RUNTIME)
    public static @interface UpdateName {
    }

}
